home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------------------
- //----------------------------------------------------------------------------------------
- //
- // Filename : timer.h
- // Description : Header file for Timer class
- // Author : Marnich van Rensburg (2002)
- //
- //----------------------------------------------------------------------------------------
- //----------------------------------------------------------------------------------------
-
- #include <stdarg.h>
- #include <stdio.h>
- #include <windows.h>
-
- #ifndef TIMER_H
- #define TIMER_H
-
- class Timer
- {
- public:
-
- Timer();
- float GetTime();
- bool CheckFreq(float Freq);
-
- private:
-
- float Start;
-
- struct // Create A Structure For The Timer Information
- {
- __int64 frequency; // Timer Frequency
- float resolution; // Timer Resolution
- unsigned long mm_timer_start; // Multimedia Timer Start Value
- unsigned long mm_timer_elapsed; // Multimedia Timer Elapsed Time
- bool performance_timer; // Using The Performance Timer?
- __int64 performance_timer_start; // Performance Timer Start Value
- __int64 performance_timer_elapsed; // Performance Timer Elapsed Time
- } TimerData; // Structure Is Named timer
-
- };// Tmr
-
- #endif;